package com.wantup.springboot.boot.beans;

import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.context.annotation.Bean;

import java.util.Date;


//要和数据库  一一对应
public class TxPerson {

    /**
     *   `pid` int(11) NOT NULL AUTO_INCREMENT,
     *   `username` varchar(255) DEFAULT NULL,
     *   `password` varchar(255) DEFAULT NULL,
     *   `pname` varchar(255) DEFAULT NULL,
     *   `gender` int(2) DEFAULT NULL,
     *   `addr` varchar(255) DEFAULT NULL,
     *   `birth` date DEFAULT NULL,
     */

    private Integer pid;
    private String username;
    private String password;
    private String pname;
    private Integer gender;
    private String addr;
    //@JSONField(format = "yyyy-MM-dd" )
    private Date birth;

    public TxPerson() {
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    @Override
    public String toString() {
        return "TxPerson{" +
                "pid=" + pid +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", pname='" + pname + '\'' +
                ", gender=" + gender +
                ", addr='" + addr + '\'' +
                ", birth=" + birth +
                '}';
    }
}
